/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonBackReference;

import com.jims.master.common.persistence.DataEntity;

/**
 * 药品类别字典表Entity
 * @author CTQ
 * @version 2017-03-01
 */
public class DrugClassDict extends DataEntity<DrugClassDict> {
	
	private static final long serialVersionUID = 1L;
	private String classCode;		// 类别代码
	private String className;		// 类别名称
	private DrugClassDict parent;		// 父级ID集合
	private String parentIds;		// 所有父级编号
	
	public DrugClassDict() {
		super();
	}

	public DrugClassDict(String id){
		super(id);
	}

	@Length(min=1, max=10, message="类别代码长度必须介于 1 和 10 之间")
	public String getClassCode() {
		return classCode;
	}

	public void setClassCode(String classCode) {
		this.classCode = classCode;
	}
	
	@Length(min=1, max=40, message="类别名称长度必须介于 1 和 40 之间")
	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}
	
	@JsonBackReference
	public DrugClassDict getParent() {
		return parent;
	}

	public void setParent(DrugClassDict parent) {
		this.parent = parent;
	}
	
	@Length(min=0, max=2000, message="所有父级编号长度必须介于 0 和 2000 之间")
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
}